83baed0bfe8ecd577544d10b35f5882eca55cdcf,jetty-server/src/test/java/org/eclipse/jetty/server/HttpConnectionTest.java,HttpConnectionTest,testUnconsumedErrorStream,#,595
Before Change
int offset=0;
offset=0;
requests=
"GET /R1?error=599 HTTP/1.1\n"+
"Host: localhost\n"+
"Transfer-Encoding: chunked\n"+
"Content-Type: application/data; charset=utf-8\n"+
"\015\012"+
"5;\015\012"+
"12345\015\012"+
"5;\015\012"+
"67890\015\012"+
"0;\015\012\015\012"+
"GET /R2 HTTP/1.1\n"+
"Host: localhost\n"+
"Content-Type: text/plain; charset=utf-8\n"+
"Content-Length: 10\n"+
"Connection: close\n"+
"\n"+
"abcdefghij\n";
response=connector.getResponses(requests);
offset = checkContains(response,offset,"HTTP/1.1 599");
offset = checkContains(response,offset,"HTTP/1.1 200");
offset = checkContains(response,offset,"/R2");
offset = checkContains(response,offset,"encoding=UTF-8");
offset = checkContains(response,offset,"abcdefghij");
}
@Test
After Change
public void testUnconsumedErrorStream() throws Exception
{
int offset=0;
String requests=
"GET /R1?error=599 HTTP/1.1\r\n"+
"Host: localhost\r\n"+
"Transfer-Encoding: chunked\r\n"+
"Content-Type: application/data; charset=utf-8\r\n"+
"\r\n"+
"5;\r\n"+
"12345\r\n"+
"5;\r\n"+
"67890\r\n"+
"0;\r\n" +
"\r\n"+
"GET /R2 HTTP/1.1\r\n"+
"Host: localhost\r\n"+
"Content-Type: text/plain; charset=utf-8\r\n"+
"Content-Length: 10\r\n"+
"Connection: close\r\n"+
"\r\n"+
"abcdefghij\r\n";
String response = connector.getResponses(requests);
offset = checkContains(response,offset,"HTTP/1.1 599");
offset = checkContains(response,offset,"HTTP/1.1 200");
offset = checkContains(response,offset,"/R2");
offset = checkContains(response,offset,"encoding=UTF-8");
checkContains(response,offset,"abcdefghij");
}
@Test